<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Vue</title>
</head>

<body id="test">
    <div id="app">
        <h1 v-on:click="onClick">点击事件</h1>
        <h3>{{ msg }}</h3>
        <h1>测试v-text</h1>
        <div v-text="msg"></div>
        <h1 v-html='html'></h1>
        <input type="text" v-model="msg">
        <input type="text" v-model="count">
    </div>
    <script src="./dep.js"></script>
    <script src="./watcher.js"></script>
    <script src="./compiler.js"></script>
    <script src="./observer.js"></script>
    <script src="./vue.js"></script>
    <script>
        let vm = new Vue({
            el: '#app',
            data: {
                msg: '这是msg',
                count: 2,
                html: '<h1>这是大标题</h1>'
            },
            methods: {
                onClick() {
                    alert('点击事件')
                }
            }
        })
    </script>
</body>

</html>